package com.example.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.entity.Advertising;
import com.example.mapper.AdvertisingMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/pie/advertising")
public class AdvertisingController {

    @Resource
    AdvertisingMapper advertisingMapper;

    @GetMapping
    public List<Advertising> getAdvertisingData(){
        return advertisingMapper.selectList(Wrappers.lambdaQuery());
    }
}
